package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TJoinApplyMapper;
import com.ruoyi.business.domain.TJoinApply;
import com.ruoyi.business.service.ITJoinApplyService;

/**
 * 加盟申请Service业务层处理
 * 
 * @author laougo
 * @date 2025-08-13
 */
@Service
public class TJoinApplyServiceImpl implements ITJoinApplyService 
{
    @Autowired
    private TJoinApplyMapper tJoinApplyMapper;

    /**
     * 查询加盟申请
     * 
     * @param applyId 加盟申请主键
     * @return 加盟申请
     */
    @Override
    public TJoinApply selectTJoinApplyByApplyId(Long applyId)
    {
        return tJoinApplyMapper.selectTJoinApplyByApplyId(applyId);
    }

    /**
     * 查询加盟申请列表
     * 
     * @param tJoinApply 加盟申请
     * @return 加盟申请
     */
    @Override
    public List<TJoinApply> selectTJoinApplyList(TJoinApply tJoinApply)
    {
        return tJoinApplyMapper.selectTJoinApplyList(tJoinApply);
    }

    /**
     * 新增加盟申请
     * 
     * @param tJoinApply 加盟申请
     * @return 结果
     */
    @Override
    public int insertTJoinApply(TJoinApply tJoinApply)
    {
        tJoinApply.setCreateTime(DateUtils.getNowDate());
        return tJoinApplyMapper.insertTJoinApply(tJoinApply);
    }

    /**
     * 修改加盟申请
     * 
     * @param tJoinApply 加盟申请
     * @return 结果
     */
    @Override
    public int updateTJoinApply(TJoinApply tJoinApply)
    {
        return tJoinApplyMapper.updateTJoinApply(tJoinApply);
    }

    /**
     * 批量删除加盟申请
     * 
     * @param applyIds 需要删除的加盟申请主键
     * @return 结果
     */
    @Override
    public int deleteTJoinApplyByApplyIds(Long[] applyIds)
    {
        return tJoinApplyMapper.deleteTJoinApplyByApplyIds(applyIds);
    }

    /**
     * 删除加盟申请信息
     * 
     * @param applyId 加盟申请主键
     * @return 结果
     */
    @Override
    public int deleteTJoinApplyByApplyId(Long applyId)
    {
        return tJoinApplyMapper.deleteTJoinApplyByApplyId(applyId);
    }
}
